package com.systemic.service;

import com.systemic.pojo.Dynamic;
import com.systemic.vo.DynamicVo;
import com.systemic.vo.PageVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @ClassName: DynamicService
 * @Description: 动态服务层
 * @Author:
 * @CreateTime: 2024-01-05 13:55
 * @Version:
 **/
public interface DynamicService {
    /**
     * 发布动态
     *
     * @param images
     * @param dynamic
     * @param subject
     * @return
     */
    int publish(MultipartFile[] images, Dynamic dynamic, Integer[] subject) throws IOException;

    /**
     * 查看指定动态
     * @param dynamic
     * @return
     */
    DynamicVo selectById(DynamicVo dynamic);

    /**
     * 修改动态
     * @param dynamic
     * @param images
     * @param subject
     * @return
     */
    int update(Dynamic dynamic, MultipartFile[] images, Integer[] subject);

    /**
     * 删除动态
     * @param dynamic
     * @return
     */
    int delete(Dynamic dynamic);

    /**
     * 客户端：动态分页查询
     * @param pageVo
     * @return
     */
    List<Dynamic> selectList(PageVo pageVo);

    /**
     * 管理端：动态分页查询
     * @param pageVo
     * @return
     */
    List<Dynamic> getList(PageVo pageVo);

    /**
     * 管理端：批量删除
     * @param ids
     * @return
     */
    int deleteList(Integer[] ids);
}
